package com.coordinator.test;

import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.CoordinatorLayout;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

public class MainActivity extends AppCompatActivity {
    private CoordinatorLayout mCoordinatorLayout;
    private FloatingActionButton mActoinButton;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mCoordinatorLayout = (CoordinatorLayout)findViewById(R.id.testCoordinatorLayout);
        mActoinButton = (FloatingActionButton)findViewById(R.id.testFloatingActionButton);
        mActoinButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(mCoordinatorLayout, "klsk", 3000).show();

                Intent mintent = new Intent(MainActivity.this, AppBarLayoutActivity.class);
                startActivity(mintent);
            }
        });
    }
}
